from django.urls import path, include
from rest_framework.routers import DefaultRouter

from apps.project.views import ProjectQuotaViewSet, ProjectMaintainViewSet, ProjectDevelopViewSet, \
    ProjectMaintainInitView, ProjectDevelopInitView, ProjectMaintainAccountViewSet, ProjectMaintainStageViewSet, \
    ProjectDevelopAccountViewSet, ProjectDevelopStageViewSet, ProjectProcessViewSet, ProjectMaintainInitBySalesAmount, \
    ProjectDevlopInitByQuoteDays, ProjectCombineAccountView, ProjectCombineStageView

project_router = DefaultRouter()
project_router.register('projectquota', ProjectQuotaViewSet, 'Project Quota List')
project_router.register('projectmaintain', ProjectMaintainViewSet, 'Project Maintain List')
project_router.register('projectdevelop', ProjectDevelopViewSet, 'Project Develop List')
project_router.register('projectmaintainaccount', ProjectMaintainAccountViewSet, 'Project Maintain Account List')
project_router.register('projectmaintainstage', ProjectMaintainStageViewSet, 'Project Maintain Stage List')
project_router.register('projectdevelopaccount', ProjectDevelopAccountViewSet, 'Project Develop Account List')
project_router.register('projectdevelopstage', ProjectDevelopStageViewSet, 'Project Develop Stage List')
project_router.register('projectprocess', ProjectProcessViewSet, 'Project Process List')


project_urlpatterns = [
    path('', include(project_router.urls)),
    path('get_inidata/', ProjectMaintainInitView.as_view(), name='Init Data'),
    path('get_inidata_bysalesamount/', ProjectMaintainInitBySalesAmount.as_view(), name='Init Data By Sales Amount'),
    path('get_develop_inidata/', ProjectDevelopInitView.as_view(), name='Init Data'),
    path('get_develop_inidata_byquotedays/', ProjectDevlopInitByQuoteDays.as_view(), name='Init Data By Quote Days'),
    path('combined_account/<int:plan_id>/', ProjectCombineAccountView.as_view(), name='combined-account-data'),
    path('combined_stage/<int:plan_id>/', ProjectCombineStageView.as_view(), name='combined-stage-data'),
]